package com.scu.dao;
import com.scu.pojo.User;
import com.scu.pojo.UserSearch;
import org.apache.ibatis.annotations.Param;

import java.util.List;
public interface UserDao {
    /*
    Author: WenjunPeng
    Time: 06/11 2020 14:57
    */

    public List<User> checkLoginInfo(@Param("email")String email, @Param("pwd")String pwd);
    public void addRegisterInfo(@Param("user")User user);
    public int modifyOnlineInfo(@Param("id")int id,@Param("status")int status);
    public List<User> checkFriends(@Param("id")int id);
    public int addFriend(@Param("source_id")int source_id,@Param("target_id")int target_id);
    public int deleteFriend(@Param("source_id")int source_id,@Param("target_id")int target_id);
    public int modifyLoginInfo(@Param("user")User user);

    public List<User> checkFriendsByPage(@Param("info")UserSearch info,@Param("index")int index, @Param("limit")int limit);
    public int getFriendsCount(@Param("info")UserSearch info);

    public int checkIsFollowedByMe(@Param("u_id")int u_id, @Param("target_id")int target_id);
    public List<User> checkMyFollows(@Param("u_id")int u_id);
}
